﻿<h1>修改文章信息</h1>

<div id="flash"> 
    <% if flash[:notice] -%>
        <div id="notice"> <%= flash[:notice] %></div>
    <% end -%>
</div>

<% form_tag :action => 'update', :id => @article do %>
<%= error_messages_for 'article' %>

<!--[form:article]-->
<p><label for="article_articletitle"><b>文章标题</b></label><br/>
<%= text_field 'article', 'articletitle'  %></p>

<p><label for="article_author">文章作者</label><br/>
<%= text_field 'article', 'author'  %></p>

<p><label for="article_department"><b>所在科室</b></label><br/>
  <select name="article[department_id]">
   <% @departments.each do |department| %>
       <option value="<%= department.id %>"
         <%= ' selected' if department.id == @article.department_id %>>
         <%= department.name %>
       </option>
   <% end %>
  </select></p>

</p>

<p><label for="article_receiveddate"><b>收稿日期</b></label><br/>
<%= date_select 'article', 'receiveddate'  %></p>

<p><label for="article_contributedate"><b>投稿日期</b></label><br/>
<%= date_select 'article', 'contributedate'  %></p>

<p><label for="article_journal"><b>所投期刊</b></label><br/>
<%= text_field 'article', 'journal'  %></p>

<p><label for="article_issuenumber"><b>期刊月号</b></label><br/>
<%= text_field 'article', 'issuenumber'  %></p>
<!--[eoform:article]-->

<%= submit_tag '确定' %>
<%end -%>
  
<p><label for="article_reviewdate"><b>审稿记录</b></label><br/>

<% unless @article.revision_records.length != 0 %>
<table border="1">
  <tr>
    <th>审稿人</th>
    <th>返稿时间</th>
    <th>回稿时间</th>
  </tr>
  <%= render(:partial =>"revision_record_item", :collection => @article.revision_records)%>
</table>


<% end %>
